//
//  ZHIMClientDelegate.h
//  ZHIMCore
//
//  Created by Chen Zhangli on 2021/1/18.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSUInteger, ZHIMConnectionState) {
    ZHIMConnectionStateNone,
    ZHIMConnectionStateConnected,
    ZHIMConnectionStateDisconnected,
    ZHIMConnectionStateFailed
};

@protocol ZHIMClientDelegate <NSObject>

@optional

/// 连接服务器的状态变化时会接收到该回调
/// @param state 当前状态
- (void)connectionStateDidChange:(ZHIMConnectionState)state;


/// 自动登录完成时的回调
/// @param error 错误信息
- (void)autoLoginDidCompleteWithError:(NSError *)error;


/// 当前登录账号在其它设备登录时会接收到此回调
- (void)userAccountDidLoginOnOtherDevice;


/// 当前登录账号被强制退出时会收到该回调
/// @param error 错误信息
- (void)userAccountDidForcedToLogout:(NSError *)error;


/// 当前登录账号token已过期
- (void)userTokenDidExpired;

@end
